Currently, Ethernet technologies are widely applied. In an Ethernet, data are processed in turn in the physical layer, the Media Access Control (MAC) layer and the IP layer when being forwarded.
The processing at the physical layer may be implemented by a physical layer apparatus of a network device, such as a dedicated physical layer processing chip. Specifically, the structure of the physical layer apparatus may be characterized into two types. The first type of the structure is shown in FIG. 1. In such a case, the physical layer apparatus is a physical layer standard apparatus. The physical layer apparatus includes a plurality of analog interfaces (may also be called physical ports) on a user side, analog/digital (A/D) conversion units respectively corresponding to the analog interfaces, clock and coding/decoding processing units respectively corresponding to each analog interface, MAC layer interface processing units respectively corresponding to each analog interface, and digital interfaces respectively corresponding to each analog interface. It can be seen from FIG. 1 that, in the physical layer standard apparatus, the number of the analog interfaces is equal to that of the digital interfaces. The second type of structure is shown in FIG. 2. In such a case, the apparatus is a physical layer multiplexing apparatus. The physical layer multiplexing apparatus includes a plurality of analog interfaces on the user side, analog/digital conversion units respectively corresponding to each analog interface, clock and coding/decoding processing units respectively corresponding to each analog interface, MAC layer processing units corresponding to each analog interface, a multiplex and de-multiplex processing unit and a multiplexed digital interface. It can be seen from FIG. 2 that, the physical layer multiplexing apparatus has the multiplex and de-multiplex processing unit which is capable of performing multiplex processing to data outputted from each analog interface and performing de-multiplex processing to multiplexed data to be sent to each analog interface. Therefore, the digital interfaces may be multiplexed, which dramatically reduces the number of the digital interfaces.
The processing at the MAC layer may be implemented by a MAC layer apparatus of the network device, such as a dedicated MAC layer processing chip. The structure of the MAC layer apparatus is shown in FIG. 3. The MAC layer apparatus includes a plurality of digital interfaces connected with a previous level apparatus, a MAC layer access control unit and a MAC layer logical link layer unit. The MAC layer apparatus may further include an IP layer interface unit. The processing at the IP layer may be implemented by an IP layer apparatus of the network device, such as a dedicated IP layer processing chip. The structure of the IP layer apparatus is shown in FIG. 4. The IP layer apparatus includes a plurality of digital interfaces connected with a previous level apparatus and an IP layer processing unit.
FIG. 5 is a flowchart illustrating a conventional process of data forwarding. As shown in FIGS. 1 to 5, data is processed in turn in the physical layer, MAC layer and IP layer when being forwarded in the Ethernet. The process mainly includes the following processes.
Block 501: After receiving data, each analog interface such as analog interface 1 and analog interface 2 of a physical layer apparatus in a network device sends the data to A/D conversion unit 1 and A/ID conversion unit 2, respectively.
Block 502: The A/D conversion units 1 and 2 convert the data received in form of analog signals into data in the form of digital signals, and send the converted data to clock and coding/decoding units 1 and 2, respectively.
Block 503: The clock and coding/decoding units 1 and 2 perform clock and coding/decoding processing to the data received, and send the processed data to MAC layer interface processing units 1 and 2.
Block 504: The MAC layer interface processing units 1 and 2 perform various MAC layer interface processing to the data received, and send the processed data to digital interfaces. The digital interfaces respectively send the processed data to digital interfaces of a next level MAC layer apparatus.
In this Block, if the physical layer apparatus is the physical layer standard apparatus as shown in FIG. 1, the MAC layer interface processing units 1 and 2 send the processed data to the digital interfaces 1 and 2 respectively. The digital interfaces 1 and 2 respectively send the data received to the digital interfaces 1 and 2 of the MAC layer apparatus shown in FIG. 3.
If the physical layer apparatus is the physical layer multiplexing apparatus as shown in FIG. 2, the MAC layer interface processing units 1 and 2 respectively send the processed data to the multiplex and de-multiplex processing unit. The multiplex and dc-multiplex processing unit multiplexes the data received and sends the multiplexed data to the multiplexed digital interface. The multiplexed digital interface sends the data received to a digital interface of the MAC layer apparatus shown in FIG. 3.
Block 505: In the MAC layer apparatus, the data is processed by the digital interfaces, MAC layer access control unit, MAC layer logical link layer unit and IP layer interface unit before being sent out.
In this Block, if the network device which receives the data is a layer-2 network device, the network device will find an out interface according to MAC address in the data after the processing of the MAC layer apparatus, and then forward the data to another network device utilizing this out interface. The process shown in FIG. 5 is finished.
If the network device which receives the data is a layer-3 network device, the data are continued to be sent to the IP layer apparatus in the network device after the processing of the MAC layer apparatus in this Block. Then, Block 506 is performed.
Block 506: The digital interfaces in the IP layer apparatus send the data received to the IP layer processing unit. The IP layer processing unit searches for a path according to IP address in the data and sends the data to other network devices according to the search result.
FIG. 5 illustrates a processing of uplink direction, i.e. from the physical layer to the MAC layer or the IP layer. The processes of the downlink direction, i.e. from the IP layer or the MAC layer to the physical layer are conversed to those shown in FIG. 5.
It can be seen from the processes shown in FIG. 5 that, in any of the conventional network devices in the Ethernet, after receiving the data from a user terminal, the physical layer apparatus always performs various processing to the data before sending the data to the MAC layer apparatus. The MAC layer apparatus analyzes the MAC address of the data and sends the data to another network device according to the MAC address. Alternatively, the MAC layer apparatus sends the data to the IP layer apparatus. The IP layer apparatus analyzes the IP address of the data and sends the data to another network device according to the IP address. It can be seen that, in the conventional method, for data between any two user terminals in communication, the network device in the Ethernet needs to search for a path for forwarding the data according to address information carried by the data. In other words, by utilizing the conventional the physical layer processing, MAC layer processing and IP layer processing, the data are forwarded by the network device with the method of addressed forwarding. Thus, it is necessary for the network device to perform a series of processing in the physical layer and MAC layer and further in the IP layer for all data, which dramatically increases the workload of the network device and decreases the forwarding performance of the network device.
In addition, in the Ethernet, since the network device forwards the data between the user terminals with the method of the addressed forwarding, the network device is required to acquire and store address information of all user terminals whose data have been forwarded by the network device, which occupies a lot of storage resources of the network device and puts forward high requirements for the network device.